/*
 Navicat Premium Data Transfer

 Source Server         : local
 Source Server Type    : MySQL
 Source Server Version : 50718
 Source Host           : localhost
 Source Database       : apimanage

 Target Server Type    : MySQL
 Target Server Version : 50718
 File Encoding         : utf-8

 Date: 09/01/2020 12:58:32 PM
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `api_list`
-- ----------------------------
DROP TABLE IF EXISTS `api_list`;
CREATE TABLE `api_list` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL COMMENT '项目 ID',
  `api_author` varchar(50) NOT NULL,
  `request_url` varchar(256) NOT NULL COMMENT '请求地址',
  `request_methods` varchar(6) NOT NULL COMMENT '请求方法',
  `request_params` varchar(256) DEFAULT NULL COMMENT '请求参数',
  `request_desc` varchar(256) DEFAULT NULL,
  `response_json` varchar(8000) DEFAULT NULL COMMENT '返回示例',
  `remark` varchar(256) DEFAULT NULL COMMENT '备注',
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_up` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `api_list`
-- ----------------------------
BEGIN;
INSERT INTO `api_list` VALUES ('4', '3', 'admin', 'http://996.xxx.com/date', 'GET', '{\"paramsName\":\"date\",\"paramsDesc\":\"日期, 如20201010,代表2020年10朋10日\"}|{\"paramsName\":\"time\",\"paramsDesc\":\"1为显示具体时间,比如200-10-10, 0为不显示具体时间,只显示日期,可以不传该参数,不传默认time=0\"}', '获得某天的点餐名单', '{\n  date: \'2020-10-10\',\n  lunch: [\n    {\n      name: \'法外狂徒张三\',\n      menu: \'酸菜炖东海触手*1, 米饭*1, 大波霸奶茶*1\',\n      costs: \'43.3\',\n      paid: 0,\n      remark: \'法外狂徒最后的午餐\'\n    },\n    {\n      name: \'秋名山管道工\',\n      menu: \'和风星鳗散寿司*2, 金枪鱼寿司*3, 日式抹茶奶茶*1\',\n      costs: \'99.99\',\n      paid: 0,\n      remark: \'装逼王,所谓的寿司就是紫菜卷饭团\'\n    }\n  ]\n}', '测试数据', '2020-08-27 20:16:11', '2020-08-27 20:16:11'), ('5', '1', 'admin', 'https://product.xxx.com/sku', 'GET', '{\"paramsName\":\"id\",\"paramsDesc\":\"商品id, 如有多个id用逗号分隔\"}', '获得商品sku', '{\n  productId: 1,\n  productName: \'\"悟\" Inspire 2\',\n  productPrice: 19999,\n  onSalePrice: 18999\n}', '', '2020-08-30 14:38:57', '2020-08-30 14:38:57'), ('6', '5', 'admin', 'https://xxx.xxx.com/user/:id', 'PUT', '{\"paramsName\":\"id\",\"paramsDesc\":\"用户id\"}|{\"paramsName\":\"mobile\",\"paramsDesc\":\"手机号\"}|{\"paramsName\":\"email\",\"paramsDesc\":\"邮箱\"}', '编辑用户', '{\n    \"data\": {\n        \"id\": 503,\n        \"username\": \"admin3\",\n        \"role_id\": 0,\n        \"mobile\": \"111\",\n        \"email\": \"123@123.com\"\n    },\n    \"meta\": {\n        \"msg\": \"更新成功\",\n        \"status\": 200\n    }\n}', '测试数据', '2020-08-31 15:21:35', '2020-08-31 15:21:35');
COMMIT;

-- ----------------------------
--  Table structure for `fav`
-- ----------------------------
DROP TABLE IF EXISTS `fav`;
CREATE TABLE `fav` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `api_id` int(11) NOT NULL,
  `username` varchar(50) NOT NULL,
  `project_id` int(11) NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `fav`
-- ----------------------------
BEGIN;
INSERT INTO `fav` VALUES ('8', '6', 'admin', '5', '2020-09-01 11:10:20', '2020-09-01 11:10:20'), ('9', '5', 'admin', '1', '2020-09-01 11:13:04', '2020-09-01 11:13:04');
COMMIT;

-- ----------------------------
--  Table structure for `project_list`
-- ----------------------------
DROP TABLE IF EXISTS `project_list`;
CREATE TABLE `project_list` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `project_name` varchar(50) NOT NULL,
  `project_desc` varchar(255) DEFAULT NULL,
  `project_pm` varchar(20) DEFAULT NULL,
  `project_programmer` varchar(20) NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `project_list`
-- ----------------------------
BEGIN;
INSERT INTO `project_list` VALUES ('1', '静态页自动生成', '自动生成运营所需的html静态页', '法外狂徒张三', '张三他爸', '2020-08-23 16:42:49', '2020-08-23 16:42:49'), ('2', 'api管理平台', '内部项目,管理接口工具', '老八秘制汉堡', '秋名山管道工', '2020-08-23 16:44:08', '2020-08-23 16:44:08'), ('3', '统一点餐平台', '内部项目,团队内部点餐系统', '东海触手怪', '触手猎人', '2020-08-23 16:46:14', '2020-08-23 16:46:14'), ('5', '不可描述项目一', '说了可描述-哔哔哔', '不可描述产品', '不可描述程序员', '2020-08-24 19:02:04', '2020-08-24 19:02:04');
COMMIT;

-- ----------------------------
--  Table structure for `users`
-- ----------------------------
DROP TABLE IF EXISTS `users`;
CREATE TABLE `users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL COMMENT '用户名',
  `password` char(32) NOT NULL COMMENT '用户密码',
  `account_status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '账号状态, 0为禁用账号 1为可用账号',
  `contact` varchar(50) DEFAULT NULL COMMENT '联系方式',
  `role` tinyint(4) NOT NULL DEFAULT '2' COMMENT '1为超级管理员账号 2为普通账号',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `users`
-- ----------------------------
BEGIN;
INSERT INTO `users` VALUES ('1', 'admin', 'e10adc3949ba59abbe56e057f20f883e', '1', 'admin@admin.com', '1', '2020-08-20 00:00:00', '2020-08-18 00:00:00'), ('8', 'test', 'e10adc3949ba59abbe56e057f20f883e', '1', '13812345678', '2', '2020-08-28 16:20:50', '2020-08-28 16:20:50');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
